#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package ${package}.auth;

import ${package}.common.bean.po.JwtDetails;
import ${package}.common.bean.po.User;
import ${package}.common.bean.vo.JsonResult;
import ${package}.common.bean.vo.LoginVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import javax.validation.Valid;
import java.util.List;

/**
 * Description: openfeign调用用户模块demo服务接口
 *
 * @author songcx
 * @date 2019/8/20 14:11
 *
 * <pre>
 *              ${copyright}
 *      Copyright (c) 2019. All Rights Reserved.
 * </pre>
 */
@FeignClient(name = "${prefix}-auth")
public interface YkAuthUserDemoClient {

    /**
     * Description:
     * <获取所有用户>
     * @author songcx
     * @date 11:59 2019/8/21
     * @return java.util.List<User>
     **/
    @GetMapping(value = "/yk_api/user/findAllUser")
    List<User> findAllUser();

    /**
     * Description:
     * <使用账户名和密码登录>
     * @author songcx
     * @date 12:00 2019/8/21
     * @param loginVo 1
     * @return JsonResult<JwtDetails>
     **/
    @PostMapping(value = "/yk_api/user/findByUserId",consumes = "application/json")
    JsonResult<JwtDetails> loginByUserId(@RequestBody @Valid LoginVo loginVo);

    /**
     * Description:
     * <根据id删除用户>
     * @author songcx
     * @date 12:00 2019/8/21
     * @param id 1
     * @return JsonResult
     **/
    @DeleteMapping(value = "/yk_api/user/deleteUser/{id}")
    JsonResult deleteUser(@PathVariable("id") Long id);

    /**
     * Description:
     * <根据id查询用户信息>
     * @author songcx
     * @date 12:00 2019/8/21
     * @param id 1
     * @return JsonResult<User>
     **/
    @GetMapping(value = "/yk_api/user/queryUserById",consumes = "application/json")
    JsonResult<User> queryUserById(Long id);

    /**
     * Description:
     * <查询账户是否存在>
     * @author songcx
     * @date 12:00 2019/8/21
     * @param username 1
     * @param id 2
     * @return JsonResult<java.lang.Boolean>
     **/
    @GetMapping(value = "/yk_api/user/userVerifyUserId",consumes = "application/json")
    JsonResult<Boolean> userVerifyUserId(@RequestParam("username") String username,@RequestParam("id") Long id);
}
